﻿
using Newtonsoft.Json;
using System;
namespace PivotData
{
    /// <summary>
    /// A facet that is a string
    /// </summary>
    [Serializable]
    public class FacetString : FacetAbsBase
    {
        /// <summary>
        /// The data that is stored in this facet
        /// </summary>
        [JsonProperty]
        public string Value;

        /// <summary>
        /// Check that the values of these guys are equal
        /// </summary>
        /// <param name="obj"></param>
        /// <returns></returns>
        public override bool Equals(object obj)
        {
            var f = obj as FacetString;
            if (f == null)
                return false;

            return f.Name == Name && f.Value == Value;
        }
    }
}